from fastapi import FastAPI

from app.api.generate.utils.generate_queue.queue_utils import start_listen_queue
from app.api.generate.views.server_list_view import setup_set_server_state


def register_servers(app: FastAPI) -> None:
    @app.on_event('startup')
    async def startup_event():
        setup_set_server_state()

        start_listen_queue()

